package com.ljb.android.component.user.router.call

import android.content.Context
import android.os.Bundle
import com.ljb.android.comm.router.core.IRouterCall
import com.ljb.android.comm.router.core.RouterManager
import net.ljb.kt.utils.JsonParser

class UserInfoRouterCall : IRouterCall {

    override fun handleCall(context: Context, path: String, bundle: Bundle): String? {
        val userInfo = RouterManager.getUserService()?.getUserInfo()
        if (userInfo != null) {
            return JsonParser.toJson(userInfo)
        }
        return null
    }
}